// 入口js文件
const express = require('express');
const app = express();
const bodyParser = require('body-parser');

app.set('secret', 'asdhksh2323sad');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

app.use('/public', express.static(__dirname + '/public'))

app.use('/', express.static(__dirname + '/views'))


require('./db')(app)
require('./routers')(app)

// 端口号
let port = 3000
app.listen(port, () => {
 console.log(`http://localhost:${port}`);
})
